package pt.iul.poo.terrain;

import java.awt.Point;
import java.io.IOException;

import pt.iul.poo.image.SimpleImage;
import pt.iul.poo.image.properties.DisplayableElement;

public abstract class Floor {
	
	private int y;
	private int x;
	private SimpleImage eImage;
	public Floor(String fileName, int x, int y, int priority)
			throws IOException {
		eImage = new SimpleImage(fileName, x, y, priority);
		this.setX(x);
		this.setY(y);
		
	}

	public abstract boolean isPassable ();
	public abstract boolean isDestructable();
	
	@Override
	public String toString() {
		return "[ "+getX() + " , " + getY() + "]";
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public Point getPosition() {
		return eImage.getPosition();
	}

	public DisplayableElement getImage() {
		return eImage;
	}
}
